<template>
  <div class="people-cart">
    <img :src="itemObj.pic" alt="" />
    <h5>{{ itemObj.name }}</h5>
    <p>{{ itemObj.characteristic }}</p>
    <section>
      <span style="color: red">￥{{ itemObj.minPrice }}</span>
      <span class="right" v-if="sell">已售{{itemObj.numberSells}}</span>
    </section>
  </div>
</template>

<script>
export default {
  props: {
    itemObj: Object,
    sell: {
      type: Boolean,
      default: false
    },
  },
  setup() {},
};
</script>
<style lang="scss" scoped>
.people-cart {
  font-size: 15px;
  width: 48%;
  img {
    width: 100%;
    height: 216px;
    border-radius: 5px;
  }
  h5 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  p {
    font-size: 13px;
    color: #a8a8a8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 15px 0;
  }
  section{
    margin-bottom: 5px;
    .right{
      color: #999;
      float: right;
    }
  }
}
</style>